
from django.shortcuts import redirect,HttpResponse,render
from django.utils.deprecation import MiddlewareMixin

class LoginAuth(MiddlewareMixin):
	white_list = ['/login/']
	def process_request(self,request):
		current_path = request.path
		if current_path not in self.white_list:
			status = request.session.get('is_login')
			if not status:
				return redirect('login')
